package com.cuitrip.util.text;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by ak on 15/12/25.
 */
public class EmojiFilterUtils {

    public static String filterEmoji(String text){
        Pattern unicodeOutliers = Pattern.compile("[\ud83c\udc00-\ud83c\udfff]|[\ud83d\udc00-\ud83d\udfff]|[\u2600-\u27ff]",
                Pattern.UNICODE_CASE
                        | Pattern.CASE_INSENSITIVE);
        Matcher unicodeOutlierMatcher = unicodeOutliers.matcher(text);

        text = unicodeOutlierMatcher.replaceAll("");
        return text;
    }

}
